/*
Copyright (c) 2019 Alibaba Group Holding Limited

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

*/
//*******************************
//             MY_TIMER
//*******************************
#include "my_sys.h"
#ifndef __MY_TIMER_H_
#define __MY_TIMER_H_

#define TIM0_BASE 0x50000000
#define TIM2_BASE 0x50000400

#define TIMER1_LD_CNT   0X00
#define TIMER1_CUR_VLU  0X04
#define TIMER1_CTRL_REG 0X08
#define TIMER1_INT_CLR  0X0C
#define TIMER1_INT_STA  0X10

#define TIMER2_LD_CNT   0X14
#define TIMER2_CUR_VLU  0X18
#define TIMER2_CTRL_REG 0X1C
#define TIMER2_INT_CLR  0X20
#define TIMER2_INT_STA  0X24

extern void ree_timer_delay (uint32_t cnt_num);
extern void tee_timer_delay (uint32_t cnt_num);

// typedef struct
// {
//  uint32_t WRC;//pmu_weakup_ree_core
//  uint32_t SPR;//pmu_set_pc_rst
//  uint32_t SIL;//pmu_set_iram_len
//  uint32_t IDE;//pmu_iram_dec_en
//  uint32_t SIA;//pmu_set_iram_addr
// }PMU_TypeDef;

// typedef struct
// {
//  uint32_t pmu_set_iram_len;//pmu_set_iram_len
//  uint32_t pmu_set_iram_addr;//pmu_set_iram_addr
//  FunctionalState pmu_iram_dec_en;//pmu_iram_dec_en
// }PMU_InitTypeDef;

// extern void Weak_Up_Ree_Core(uint32_t pc_addr);
// extern void Init_Iram_Bus_Param(PMU_InitTypeDef* pmu_initstruct);

#endif